//
//  CustomToggleStyley.swift
//  NaiCha
//
//  Created by 唐安坤 on 2024/9/19.
//

import Foundation
import SwiftUI

struct CustomToggleStyley: ToggleStyle {
    func makeBody(configuration: Configuration) -> some View {
        return HStack{
            Image(systemName: configuration.isOn ? "checkmark.circle" : "circle")
                .resizable()
                .frame(width: 20,height: 20)
                .foregroundColor(configuration.isOn ? .green : .gray)
                .onTapGesture {
                    configuration.isOn.toggle()
                }
            configuration.label
        }
    }
}
